package com.mashibing.servicemap.controller;

import com.mashibing.internalcommon.dto.DicDistrict;
import com.mashibing.servicemap.mapper.DicDistrictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 史慕尧
 */
@RestController
public class TestController {
    @Autowired
    DicDistrictMapper dicDistrictMapper;
    @GetMapping("/test")
    public String test(){
        return "servicemap";
    }
    @GetMapping("/map")
    public String map(){
        Map<String,Object> map=new HashMap<>();
        map.put("address_code",110000);
        List<DicDistrict> dicDistricts = dicDistrictMapper.selectByMap(map);
        System.out.println(dicDistricts.get(0).toString());
        return "map";
    }
}
